import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import router from './router'
import vuetify from './plugins/vuetify'
import './plugins/element.js'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import Vuex from 'vuex'
import store from "@/store/store";

// 主要的配置文件
Vue.use(ElementUI);
// 取消生产环境的提示
Vue.config.productionTip = false


Vue.prototype.$axios = axios
// axios.defaults.baseURL='http://localhost:8080';//设置基址
axios.defaults.baseURL = "/api"

// axios 配置
axios.defaults.timeout = 10000;

// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';

// axios.defaults.headers.post['Content-Type'] = 'json';

// 使用各种插件并挂载到最初的---app标签
new Vue({
  router,
  vuetify,
  axios,
  Vuex,
  store,
  render: h => h(App)
}).$mount('#app')
